// @ts-ignore
import HomeView from '@/views/usage_user/home/HomeView.vue'
// @ts-ignore
import TecInterviewConfirm from '@/views/usage_user/tec/TecInterviewConfirm.vue'
// @ts-ignore
import WrittenInterviewConfirm from '@/views/usage_user/written/WrittenInterviewConfirm.vue'
import ACCESS_ENUM from '@/access/accessEnum'
// @ts-ignore
import LoadingView from '@/views/loading/LoadingView.vue'
// @ts-ignore
import FullInterviewConfirm from '@/views/usage_user/full_interview/FullInterviewConfirm.vue'

export const routes = [
  {
    path: '/',
    name: '首页',
    icon: 'HomeOutlined',
    component: HomeView,
  },
  {
    path: '/interview',
    name: '模拟面试',
    icon: 'RobotOutlined',
    children: [
      {
        path: '/interview/full-process',
        name: '全流程面试',
        icon: 'PlayCircleOutlined',
        children: [
          {
            path: '/full/interview/confirm',
            name: '全流程模拟面试',
            icon: 'AliwangwangOutlined',
            component: FullInterviewConfirm,
            meta: {
              access: ACCESS_ENUM.USER
            }
          },
          {
            path: '/full/interview/records',
            name: '全流程面试分析报告',
            icon: 'ReadOutlined',
            // @ts-ignore
            component: () => import('@/views/usage_user/full_interview/FullProcessInterviewRecords.vue'),
            meta: {
              access: ACCESS_ENUM.USER
            }
          }
        ]
      },
      {
        path: '/interview/special-practice',
        name: '模块化练习',
        icon: 'ExperimentOutlined',
        children: [
          {
            path: '/resume/upload',
            name: '简历筛选',
            icon: 'SnippetsOutlined',
            // @ts-ignore
            component: () => import('@/views/usage_user/resume/ResumeUpload.vue'),
            meta: {
              access: ACCESS_ENUM.USER
            }
          },
          {
            path: '/written/Interview/confirm',
            name: '笔试',
            icon: 'EditOutlined',
            component: WrittenInterviewConfirm,
            meta: {
              access: ACCESS_ENUM.USER
            }
          },
          {
            path: '/written/record',
            name: '笔试分析报告',
            icon: 'FileTextOutlined',
            // @ts-ignore
            component: () => import('@/views/usage_user/written/WrittenRecord.vue'),
            meta: {
              access: ACCESS_ENUM.USER
            }
          },
          {
            path: '/tec/interview/confirm',
            name: '技术面',
            icon: 'CodeOutlined',
            component: TecInterviewConfirm,
            meta: {
              access: ACCESS_ENUM.USER
            }
          },
          {
            path: '/tec/record',
            name: '技术面记录',
            icon: 'HistoryOutlined',
            // @ts-ignore
            component: () => import('@/views/usage_user/tec/TecInterviewRecord.vue'),
            meta: {
              access: ACCESS_ENUM.USER
            }
          },
          {
            path: '/hr/interview/confirm',
            name: 'HR面',
            icon: 'CommentOutlined',
            // @ts-ignore
            component: () => import('@/views/usage_user/hr/HrInterviewConfirm.vue'),
            meta: {
              access: ACCESS_ENUM.USER
            }
          },
          {
            path: '/hr/interview/record',
            name: 'HR面记录',
            icon: 'ProfileOutlined',
            // @ts-ignore
            component: () => import('@/views/usage_user/hr/HrInterviewRecord.vue'),
            meta: {
              access: ACCESS_ENUM.USER
            }
          }
        ]
      }
    ]
  },
  {
    path: '/special-exercise',
    name: '专项练习',
    icon: 'RocketOutlined',
    children: [
      {
        path: '/generate/self-introduction',
        name: '自我介绍',
        icon: 'UserOutlined',
        // @ts-ignore
        component: () => import('@/views/usage_user/special_exercise/SelfIntroduction.vue'),
        meta: {
          access: ACCESS_ENUM.USER,
        }
      },
      {
        path: '/generate/project-introduction',
        name: '项目介绍',
        icon: 'CodeOutlined',
        // @ts-ignore
        component: () => import('@/views/usage_user/special_exercise/ProjectIntroduction.vue'),
        meta: {
          access: ACCESS_ENUM.USER,
        }
      },
      {
        path: '/generate/internship-introduction',
        name: '实习介绍',
        icon: 'ApartmentOutlined',
        // @ts-ignore
        component: () => import('@/views/usage_user/special_exercise/InternshipIntroduction.vue'),
        meta: {
          access: ACCESS_ENUM.USER,
        }
      },
      {
        path: '/generate/job-introduction',
        name: '工作介绍',
        icon: 'SolutionOutlined',
        // @ts-ignore
        component: () => import('@/views/usage_user/special_exercise/JobIntroduction.vue'),
        meta: {
          access: ACCESS_ENUM.USER,
        }
      },
      {
        path: '/generate/interview-questions',
        name: '面试押题',
        icon: 'BulbOutlined',
        // @ts-ignore
        component: () => import('@/views/usage_user/special_exercise/InterviewQuestions.vue'),
        meta: {
          access: ACCESS_ENUM.USER,
        }
      },
    ]
  },
  {
    path: '/community',
    name: '职场社区',
    icon: 'BookOutlined',
    // @ts-ignore
    component: () => import('@/views/usage_user/community/Community.vue'),
  },
  {
    path: '/generate-resume',
    name: '智能简历生成',
    icon: 'FileTextOutlined',
    // @ts-ignore
    component: () => import('@/views/usage_user/generate_resume/GenerateResume.vue'),
    meta: {
      access: ACCESS_ENUM.USER,
    },
  },
  {
    path: '/my-messages',
    name: '我的消息',
    icon: 'MessageOutlined',
    // @ts-ignore
    component: () => import('@/views/usage_user/user/UserMessages.vue'),
    meta: {
      access: ACCESS_ENUM.USER,
    },
  },
  {
    path: '/my-interview-analysis',
    name: '我的面试',
    icon: 'LineChartOutlined',
    // @ts-ignore
    component: () => import('@/views/usage_user/echarts/UserInterviewEcharts.vue'),
    meta: {
      access: ACCESS_ENUM.USER,
    },
  },
  {
    path: '/api/analyze/resume',
    name: '简历分析',
    // @ts-ignore
    component: () => import('@/views/usage_user/analyze/ResumeAnalysis.vue'),
    meta: {
      hideInMenu: true,
      access: ACCESS_ENUM.USER,
    },
  },
  {
    path: '/api/written/interview/:examId',
    name: '笔试做题页面',
    props: true,
    // @ts-ignore
    component: () => import('@/views/usage_user/written/WrittenInterview.vue'),
    meta: {
      hideInMenu: true,
      access: ACCESS_ENUM.USER,
    },
  },
  {
    path: '/api/written/analyze',
    name: '笔试分析页面',
    // @ts-ignore
    component: () => import('@/views/usage_user/analyze/WrittenAnalysis.vue'),
    meta: {
      hideInMenu: true,
      access: ACCESS_ENUM.USER,
    },
  },
  {
    path: '/api/tec/interview/:language',
    name: '技术面试(真正)',
    // @ts-ignore
    component: () => import('@/views/usage_user/tec/TecInterview.vue'),
    props: true,
    meta: {
      hideInMenu: true,
      access: ACCESS_ENUM.USER,
    },
  },
  {
    path: '/api/tec/analyze',
    name: '技术面试结果分析',
    // @ts-ignore
    component: () => import('@/views/usage_user/analyze/TecInterviewAnalysis.vue'),
    meta: {
      hideInMenu: true,
      access: ACCESS_ENUM.USER,
    },
  },
  {
    path: '/api/hr/interview/:language',
    name: 'HR面试(真正)',
    props: true,
    // @ts-ignore
    component: () => import('@/views/usage_user/hr/HrInterview.vue'),
    meta: {
      hideInMenu: true,
      access: ACCESS_ENUM.USER,
    },
  },
  {
    path: '/api/hr/interview/analyze',
    name: 'HR面试结果分析页面',
    // @ts-ignore
    component: () => import('@/views/usage_user/analyze/HrInterviewAnalysis.vue'),
    meta: {
      hideInMenu: true,
      access: ACCESS_ENUM.USER,
    },
  },
  {
    path: '/api/full/interview',
    name: '全流程面试(真正)',
    // @ts-ignore
    component: () => import('@/views/usage_user/full_interview/FullProcessInterview.vue'),
    meta: {
      hideInMenu: true,
      access: ACCESS_ENUM.USER,
    },
  },
  {
    path: '/api/full/interview/analyze',
    name: '全流程面试分析',
    // @ts-ignore
    component: () => import('@/views/usage_user/analyze/FullProcessAnalysis.vue'),
    meta: {
      hideInMenu: true,
      access: ACCESS_ENUM.USER,
    },
  },
  {
    path: '/loading',
    name: '加载中',
    component: LoadingView,
    meta: {
      hideInMenu: true,
    },
  },
  {
    path: '/admin/manager',
    name: '用户管理',
    // @ts-ignore
    component: () => import('@/views/admin/UserManager.vue'),
    icon: 'UserOutlined',
    meta: {
      access: ACCESS_ENUM.ADMIN,
    },
  },
  {
    path: '/user/userInfo',
    name: '个人中心',
    // @ts-ignore
    component: () => import('../views/usage_user/user/UserProfile.vue'),
    meta: {
      hideInMenu: true,
    },
  },
  // {
  //   path: '/user/echarts/analyze',
  //   name: '面试可视化分析',
  //   icon: 'MessageOutlined',
  //   // @ts-ignore
  //   component: () => import('@/views/usage_user/echarts/UserMessages.vue'),
  // },
  {
    path: '/user/login',
    name: '用户登录',
    // @ts-ignore
    component: () => import('../views/usage_user/user/UserLoginView.vue'),
    meta: {
      hideInMenu: true,
    },
  },
  {
    path: '/user/register',
    name: '用户注册',
    // @ts-ignore
    component: () => import('../views/usage_user/user/UserRegisterView.vue'),
    meta: {
      hideInMenu: true,
    },
  },
  {
    path: '/admin/login',
    name: '管理员登录',
    // @ts-ignore
    component: () => import('@/views/admin/AdminLoginView.vue'),
    meta: {
      hideInMenu: true,
    },
  },
  {
    path: '/admin/dashboard',
    name: '管理员控制台',
    icon: 'DashboardOutlined',
    // @ts-ignore
    component: () => import('@/views/admin/AdminDashboard.vue'),
    meta: {
      access: ACCESS_ENUM.ADMIN,
    },
  },
  {
    path: '/admin/pending/recruiters',
    name: '审核招聘者',
    icon: 'AuditOutlined',
    // @ts-ignore
    component: () => import('@/views/admin/PendingRecruiters.vue'),
    meta: {
      access: ACCESS_ENUM.ADMIN,
    },
  },
  {
    path: '/admin/content/Upload',
    name: '上传内容',
    icon: 'UploadOutlined',
    // @ts-ignore
    component: () => import('@/views/admin/ContentUpload.vue'),
    meta: {
      access: ACCESS_ENUM.ADMIN,
    },
  },
  {
    path: '/recruiter/login',
    name: '招聘者登录',
    // @ts-ignore
    component: () => import('@/views/recruiter/RecruiterLoginView.vue'),
    meta: {
      hideInMenu: true,
    },
  },
  {
    path: '/recruiter/register',
    name: '招聘者注册',
    // @ts-ignore
    component: () => import('@/views/recruiter/RecruiterRegisterView.vue'),
    meta: {
      hideInMenu: true,
    },
  },
  {
    path: '/recruiter/dashboard',
    name: '招聘者控制台',
    icon: 'TeamOutlined',
    // @ts-ignore
    component: () => import('@/views/recruiter/RecruiterDashboard.vue'),
    meta: {
      access: ACCESS_ENUM.RECRUITER,
    },
  },
  {
    path: '/recruiter/record',
    name: '面试记录',
    icon: 'TeamOutlined',
    // @ts-ignore
    component: () => import('@/views/recruiter/InterviewRecords.vue'),
    meta: {
      access: ACCESS_ENUM.RECRUITER,
    },
  },
  {
    path: '/recruiter/appointments',
    name: '线上约面',
    icon: 'CalendarOutlined',
    // @ts-ignore
    component: () => import('@/views/recruiter/OnlineInterviewAppointments.vue'),
    meta: {
      access: ACCESS_ENUM.RECRUITER,
    },
  }
]
